package com.bike.controller;

import java.util.Date;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("user")
public class UserController extends BaseController{
	 
	public static void main(String[] args) {
		System.out.println(new Date(1484549849000L));
	}
//	@Autowired
//	private UserService userService;
	
	@ExceptionHandler
	@ResponseBody
	public Map<String,Object> allException(Exception e){
		e.printStackTrace();
		return getErrorMap("error");
	}
  
	@RequestMapping("refund")
	@ResponseBody
	public Map<String,Object> refund(
			@RequestParam(defaultValue="0")long itemId 
			){
		 
		Map<String,Object> map=getSuccessMap();
		//map.put("result", userService.updateRefundDeposit(itemId));
		return map;
	}
}
